function [perct_act,thresh_arr]=perct_act_multiTime(ExpGroup)
adata_dir='\\argon.fmi.ch\keller.g\AData\';
perct_act=[];
thresh_arr=[];
for fnd=1:length(ExpGroup)
    display(['Exp: ' num2str(ExpGroup(fnd)) ' *****************************']);
    [adata_file,mouse_id,userID]=find_adata_file(ExpGroup(fnd),adata_dir);
    orig=load([adata_dir userID '\' mouse_id '\' adata_file],'ROIs');
    cnt=1;
    for gnd=1:length(orig.ROIs)
        for hnd=1:length(orig.ROIs{gnd})
            act=ftfil(orig.ROIs{gnd}(hnd).activity,18,0,10);
            act=psmooth(act);
            baseline=median(act);
            raw_act=act/baseline;
            raw_act=raw_act-1;
            thresh=det_thresh_for_peak_resp(raw_act);
            raw_act(raw_act<thresh)=0;
            perct_act(cnt,fnd)=sum(logical(raw_act))/length(raw_act);
            thresh_arr(cnt,fnd)=thresh;
            cnt=cnt+1;
        end
    end
end

figure;
for jnd=1:length(ExpGroup)
    hold on
    subplot(1,length(ExpGroup),jnd)
    hist(perct_act(:,jnd),20)
    ylim([0 500])
    xlim([0 0.5])
end

diff_arr=diff(perct_act,1,2);

figure;
for jnd=1:size(diff_arr,2)
    hold on
    subplot(1,size(diff_arr,2),jnd)
    hist(diff_arr(:,jnd),20)
    ylim([0 size(diff_arr,1)-200])
    xlim([-0.5 0.5])
end

% 
% 
% 
% figure;plot(perct_act{1}(:,46))
% hold on
% plot(perct_act{2}(:,46),'r')
% plot(perct_act{3}(:,46),'g')
% plot(perct_act{4}(:,46),'y')
% plot(perct_act{5}(:,46),'k')
% plot(perct_act{6}(:,46),'c')
% plot(perct_act{7}(:,46),'m')
% 
% cell_arr=[];
% for gnd=1:7
%     cell_arr(:,gnd)=mean(perct_act{gnd},2);
% end
% 
% diff_arr=[];
% for gnd=1:6
%     diff_arr(:,gnd)=diff([cell_arr(:,gnd) cell_arr(:,gnd+1)],1,2);
% end
% 
% figure;imagesc(diff_arr)
% colorbar
% set(gca,'clim',[0 0.5])
% 
% inc_act=[];
% for knd=1:size(diff_arr,1)
%     if sum(diff_arr(knd,:)>0)==6
%         inc_act(knd)=knd;
%     end
% end
% inc_act(inc_act==0)=[];
% 
% dec_act=[];
% for knd=1:size(diff_arr,1)
%     if sum(diff_arr(knd,:)<0)==6
%         dec_act(knd)=knd;
%     end
% end
% dec_act(dec_act==0)=[];